<%--
    Document   : home
    Created on : Oct 23, 2011, 5:06:42 PM
    Author     : Group 106
--%>

<%@page contentType="text/html" pageEncoding="UTF-8" errorPage="error.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script language="javascript" type="text/text/javascript">

    function checkInputData()
    {

        if(document.login.email.value == ""){
            alert("You must input Email!");
            document.login.email.focus();
            return false;
        }
        if(document.login.password.value == ""){
            alert("You must input password!");
            document.login.password.focus();
            return false;
        }
        return true;
    }
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>My Sweet Home Websites </title>
<meta name="keywords" content="my sweet home, real estate website, website my home, msh, CSS, XHTML" />
<meta name="description" content="Real Estate , website eproject of Aptech" />
<link href="CSS/msh_style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="CSS/gallery_style.css" />
</head>
<body>
<div id="msh_container">
<div id="msh_top_panel">
	<div id="msh_header_section">
		<div id="msh_header">

        </div>
    </div> <!-- end of header section -->

    <div id="msh_menu_login_section">
    	<div id="msh_menu_section">
        	<div id="msh_menu_panel">
                <ul>
                    <li><a href="index.html" class="current">Home</a></li>
                    <li><a href="subpage.html">FAQs</a></li>
                    <li><a href="register.jsp">Register</a></li>
                    <li><a href="#">About</a></li>
                    <li><a href="#">Contact</a></li>
                </ul>
            </div> <!-- end of menu -->
        </div>
        <div id="msh_login_section">
        	<form name="login" id="login" action="userLogin.do" method="post" onsubmit="return checkInputData()">
            	<label>Email Address:</label><input type="text" name="email" class="input_field" /><label>Password:</label><input type="password" name="password" class="input_field" /><input type="submit" value="" name="btnLogin" class="submit_btn" />
            </form>
        </div>
    </div> <!-- end of menu login section -->
</div> <!-- end of top panel -->

<div id="msh_gallery_panel">
<div id="gallery">
  <div id="imagearea">
    <div id="image">
      <a href="javascript:slideShow.nav(-1)" class="imgnav " id="previmg"></a>
      <a href="javascript:slideShow.nav(1)" class="imgnav " id="nextimg"></a>
    </div>
  </div>
  <div id="thumbwrapper">
    <div id="thumbarea">
      <ul id="thumbs">
        <li value="1"><img src="images/thumbs/1.jpg" width="179" height="100" alt="" /></li>
        <li value="2"><img src="images/thumbs/2.jpg" width="179" height="100" alt="" /></li>
        <li value="3"><img src="images/thumbs/3.jpg" width="179" height="100" alt="" /></li>
        <li value="4"><img src="images/thumbs/4.jpg" width="179" height="100" alt="" /></li>
        <li value="5"><img src="images/thumbs/5.jpg" width="179" height="100" alt="" /></li>
        <li value="3"><img src="images/thumbs/3.jpg" width="179" height="100" alt="" /></li>
        <li value="4"><img src="images/thumbs/4.jpg" width="179" height="100" alt="" /></li>
        <li value="5"><img src="images/thumbs/5.jpg" width="179" height="100" alt="" /></li>
      </ul>
    </div>
  </div>
</div>

<script type="text/javascript">
var imgid = 'image';
var imgdir = 'images/fullsize';
var imgext = '.jpg';
var thumbid = 'thumbs';
var auto = true;
var autodelay = 5;
</script>
<script type="text/javascript" src="JS/slide.js"></script>

</div>

<div id="msh_content_panel_register">

	<div id="msh_news_section_register">
    	<h1>FAQs List</h1>
        <div class="msh_news_box">

            <div id="main">
		<div id="main_content">
		<div id="faqs">
			<div class="advertisement2">
			
			<div class="clear"></div><!--End .clear-->
                        <%
                            com.aptech.DAO.faqDAO objFaqDAO = new com.aptech.DAO.faqDAO();
                            java.util.ArrayList<com.aptech.model.Faq> listFaq = objFaqDAO.getFaq();
                            if(listFaq.size()>0){
                            for(int i = 0; i<listFaq.size();i++){
                                com.aptech.model.Faq objFaq = listFaq.get(i);
                        %>
			<div class="faq_content_left"></div>
			<div class="faq_content_center">
				<div id="question"><%=i %>: <%=objFaq.getQuestion() %></div>
				<div id="answer"><%=objFaq.getAnswer() %></div>
                                <br/>
                                <hr/>
			</div>
			<div class="faq_content_right"></div>
                        <% } }else{
                        %>
                            <div class="faq_content_left"></div>
			<div class="faq_content_center">
				<div id="question">Khong Co Faq!</div>
				<div id="answer"></div>
                                <br/>
                                <hr/>
			</div>
			<div class="faq_content_right"></div>
                        <%
                        } %>
			<div class="clear"></div><!--End .clear-->
			<!--<div class="faq_footer_left"><img src="Imgs/mn_footer_left.png" /></div> -->
			<div class="faq_footer_center"></div>
			<!-- <div class="faq_footer_right"><img src="Imgs/mn_footer_right.png" /></div> -->

		</div><!--End .advertisement-->
		</div>
		</div><!--End #main_content-->
	</div><!--End #main-->

        </div>
    </div><!-- end of news section -->
    <div class="cleaner_with_height">&nbsp;</div>
    <div class="cleaner_with_height">&nbsp;</div>
</div>

<div id="msh_footer_panel">
    Copyright © 2011 <a href="aptech.vn">Ha Noi - Aptech</a> | <a href="home.jsp" target="_parent">Website My Sweet Home</a> by <a href="home.jsp" target="_blank">Group 106</a></div>
</div> <!-- end of container -->
</body>
</html>
<%--
<html>
    <head>
         <link rel="stylesheet" href="CSS/css-style.css" />
		          <link rel="stylesheet" href="CSS/css_faq.css" />
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <div id="wrap">
	<div id="header">

		<!--End #logo-->
		<div id="banner"><img src="Imgs/banner.png" height="250px" width="990 px" /></div><!--End #banner-->
		<div class="clear"></div>
		<div id="nav">
		 <a href="home.jsp">Home</a>
		 <strong>::</strong>
		 <a href="registertype.jsp">Register</a>
                 <strong>::</strong>
		 <a href="login.jsp">Login</a>
		 <strong>::</strong>
		 <a href="#">Faqs</a>
	  </div>
	</div>
	<!--End #header-->

	<div class="clear"></div><!--End .clear-->
	<div id="main">
		<div id="main_content">
		<div id="faqs">
			<div class="advertisement2">
			<div class="faq_top_left"><img src="Imgs/mn_top_left.png" /></div>
			<div class="faq_top_center"></div>
			<div class="faq_top_right"><img src="Imgs/mn_top_right.png" /></div>
			<div class="clear"></div><!--End .clear-->
                        <%
                            com.aptech.DAO.faqDAO objFaqDAO = new com.aptech.DAO.faqDAO();
                            java.util.ArrayList<com.aptech.model.Faq> listFaq = objFaqDAO.getFaq();
                            if(listFaq.size()>0){
                            for(int i = 0; i<listFaq.size();i++){
                                com.aptech.model.Faq objFaq = listFaq.get(i);
                        %>
			<div class="faq_content_left"></div>
			<div class="faq_content_center">
				<div id="question"><%=i %>: <%=objFaq.getQuestion() %></div>
				<div id="answer"><%=objFaq.getAnswer() %></div>
                                <br/>
                                <hr/>
			</div>
			<div class="faq_content_right"></div>
                        <% } }else{
                        %>
                            <div class="faq_content_left"></div>
			<div class="faq_content_center">
				<div id="question">Khong Co Faq!</div>
				<div id="answer"></div>
                                <br/>
                                <hr/>
			</div>
			<div class="faq_content_right"></div>
                        <%
                        } %>
			<div class="clear"></div><!--End .clear-->
			<div class="faq_footer_left"><img src="Imgs/mn_footer_left.png" /></div>
			<div class="faq_footer_center"></div>
			<div class="faq_footer_right"><img src="Imgs/mn_footer_right.png" /></div>

		</div><!--End .advertisement-->
		</div>
		</div><!--End #main_content-->		
	</div><!--End #main-->
	<div class="clear"></div><!--End .clear-->
	<div id="footer">Copyright © APTECH.</div><!--End #footer-->
	<div class="clear"></div><!--End .clear-->
</div><!--End #wrap-->
<div class="clear"></div><!--End .clear-->
    </body>
</html>
--%>